<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%contact}}".
 *
 * @property integer $id
 * @property string $name
 * @property string $desc
 * @property string $address
 * @property string $qq
 * @property string $wechat
 * @property string $mail
 * @property string $tel
 */
class Contact extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%contact}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['desc', 'address'], 'required'],
            [['desc'], 'string'],
            [['name'], 'string', 'max' => 50],
            [['address', 'qq', 'wechat', 'mail', 'tel'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'desc' => 'Desc',
            'address' => 'Address',
            'qq' => 'Qq',
            'wechat' => 'Wechat',
            'mail' => 'Mail',
            'tel' => 'Tel',
        ];
    }
}
